package cn.edu.jsu.official.pojo.vo;

import cn.edu.jsu.official.serializer.ObjectIdSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author Mo
 * @createTime 2022/4/24 17:47
 * @description
 */
@Data
@Document(collection = "article")
public class ArticleVO {
    @Id
    @ApiModelProperty("文章Id")
    @JSONField(serializeUsing = ObjectIdSerializer.class, deserializeUsing = ObjectIdSerializer.class)
    private String articleId;

    @ApiModelProperty("文章内容")
    private String content;

    @ApiModelProperty("资源路径")
    private String resourcesPath;

    public ArticleVO() {
    }

    public ArticleVO(String articleId, String content, String resourcesPath) {
        this.articleId = articleId;
        this.content = content;
        this.resourcesPath = resourcesPath;
    }

    @Override
    public String toString() {
        return "ArticleVO{" +
                "articleId='" + articleId + '\'' +
                ", content='" + content + '\'' +
                ", resourcesPath='" + resourcesPath + '\'' +
                '}';
    }

    public String getArticleId() {
        return articleId;
    }

    public void setArticleId(String articleId) {
        this.articleId = articleId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getResourcesPath() {
        return resourcesPath;
    }

    public void setResourcesPath(String resourcesPath) {
        this.resourcesPath = resourcesPath;
    }
}
